package com.qf.service.impl;

import com.qf.dao.GoodsTypeDao;
import com.qf.entity.GoodsType;
import com.qf.service.GoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author wgy
 * @version V1.0
 * @project gp12_xiaomi
 * @package com.qf.service.impl
 * @description: ${TODO}
 * @date 2022/6/23 10:07
 */
@Service
@Transactional

public class GoodsTypeServiceImpl implements GoodsTypeService {
    private GoodsTypeDao goodsTypeDao;

    @Autowired
    public void setGoodsTypeDao(GoodsTypeDao goodsTypeDao) {
        this.goodsTypeDao = goodsTypeDao;
    }

    @Override
    public List<GoodsType> findByLevel(int level) {

        return goodsTypeDao.selectByLevel(level);
    }

    @Override
    public GoodsType findById(Integer typeid) {

        return goodsTypeDao.selectById(typeid);
    }
}
